﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kunlun.BusinessLogic
{
    public static class ProductImageToThum
    {
        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public static string Square(string url)
        {
            try
            {
                return url.Split('.')[0] + "_square." + url.Split('.')[1];
            }
            catch
            { return string.Empty; }
        }

        /// <summary>
        /// 获取产品图片的缩略图(240*240)
        /// </summary>
        /// <param name="url">图片地址</param>
        public static string Thumbnail(string url)
        {
            try
            {
                return url.Split('.')[0] + "_thumbnail." + url.Split('.')[1];
            }
            catch
            { return string.Empty; }
        }

        /// <summary>
        /// 获取产品图片的显示图(1500*1500)
        /// </summary>
        /// <param name="url">图片地址</param>
        public static string Show(string url)
        {
            try
            {
                return url.Split('.')[0] + "_show." + url.Split('.')[1];
            }
            catch
            { return string.Empty; }
        }

    }
}
